home *** CD-ROM | disk | FTP | other *** search
-
- # Module: Mission Iterator Script.
- # this script iterates over well known mission locations
- # opening up level.dat files, parsing them and telling the
- # engine about it's discovery.
-
- import os.path
- import string
- import sys
- import glob
- import level
- if __name__ != '__main__':
- import ff
- import js
-
-
- def discoverMissions(dir):
- ## change to the directory
- print "searching directory %s for mission" % dir
- tmpdir = os.path.normpath(dir) + "\\*.DAT"
- for file in glob.glob(tmpdir):
- l = level.LevelFile(file, 0)
- strName = l['name']['name']
- print "discovered mission (%s) " % strName
- if __name__ != '__main__':
- js.missionDiscovered(file, strName)
-
-
- def doit():
- discoverMissions(".\\Data\\Levels")
- #discoverMissions("\\\\Shodan\\Project\\Justice\\Levels")
- if __name__ != '__main__' and ff.LevelDir:
- discoverMissions(ff.LevelDir)
-
-
- # driver
- #
- doit()
-
-
-
-
-
-
-
-